const axios = require('axios');
const http = axios.default;

//导入local
const local = require('./local.js');
//全局默认配置 设置axios的baseURL
http.defaults.baseURL = "http://47.96.154.185:3701";
if(localStorage.getItem('token')){
    let token = local.get('token')
    http.defaults.headers.common['Authorization']='Bearer '+token;
}
//暴露
module.exports = http;
